Strings

Strings are sequences of characters. Strings are written as sequences of characters enclosed within doublequotes (<#1285#>;SPMquot;<#1285#>). A doublequote can be written inside a string only by escaping it with a backslash (<#1286#><#1286#>), as in


#scheme1287#

A backslash can be written inside a string only by escaping it with another backslash. Scheme does not specify the effect of a backslash within a string that is not followed by a doublequote or backslash.

A string constant may continue from one line to the next, but the exact contents of such a string are unspecified.

The <#1291#>length<#1291#> of a string is the number of characters that it contains. This number is a non-negative integer that is fixed when the string is created. The <#1292#>valid indexes<#1292#> of a string are the exact non-negative integers less than the length of the string. The first character of a string has index 0, the second has index 1, and so on.

In phrases such as ``the characters of <#1293#>string<#1293#> beginning with index <#1294#>start<#1294#> and ending with index <#1295#>end<#1295#>,'' it is understood that the index <#1296#>start<#1296#> is inclusive and the index <#1297#>end<#1297#> is exclusive. Thus if <#1298#>start<#1298#> and <#1299#>end<#1299#> are the same index, a null substring is referred to, and if <#1300#>start<#1300#> is zero and <#1301#>end<#1301#> is the length of <#1302#>string<#1302#>, then the entire string is referred to.

Some of the procedures that operate on strings ignore the difference between upper and lower case. The versions that ignore case have <#2095#>``<#1303#>-ci<#1303#>''<#2095#> (for ``case insensitive'') embedded in their names.


#entry1304#


#entry1311#


#entry1324#


#entry1329#


#entry1335#


#entry1345#


#entry1356#


#entry1369#


#entry1407#


#entry1422#


#entry1427#


#entry1441#


#entry1447#